<%inherit file="appliance_base.html" />

<%block name="head">
<link rel="stylesheet" type="text/css" href="${ static_url('markitup/skins/simple/style.css') }" />
<link rel="stylesheet" type="text/css" href="${ static_url('markitup/sets/markdown/style.css') }" />
</%block>

<%block name="innav">
<li>${ _("Edit") } ${ appliance.name }</li>
</%block>

<%block name="submain">

<div id="appliance-edit-form">
  <form method="POST" enctype="multipart/form-data">${ xsrf_form_html() }
    <fieldset>
      <legend>${ _("Edit Baseinfo") }</legend>
      ${ form.name.label } ${ form.name() }
      ${ form.html_errors( form.name.errors ) }

      ${ form.os.label } ${ form.os() }
      ${ form.html_errors( form.os.errors ) }

      ${ form.summary.label } ${ form.summary() }
      ${ form.html_errors( form.summary.errors ) }

      ${ form.catalog.label } ${ form.catalog() }
      ${ form.html_errors( form.catalog.errors ) }

      ${ form.logo.label } ${ form.logo() }
      ${ form.html_errors( form.logo.errors ) }

      ${ form.description.label } ${ form.description() }
      ${ form.html_errors( form.description.errors ) }

      <button type="submit" class="btn">${ _("Submit") }</button>
    </fieldset>
  </form>
</div>

<script type="text/javascript" src="${ static_url('markitup/jquery.markitup.js') }"></script>
<script type="text/javascript" src="${ static_url('markitup/sets/markdown/set.js') }"></script>

<script type="text/javascript" >
   mySettings.previewParserPath = "/t/preview?markup_language=markdown&_xsrf=${ xsrf_cookie }";
   $(document).ready(function() {
      $("#description").markItUp(mySettings);
   });
</script>

</%block>
